package com.esun.payment_api.service;

import com.esun.common.api.CommonResult;
import com.esun.payment_api.domain.Company;
import com.esun.payment_api.domain.Department;
import com.esun.payment_api.domain.User;
import com.esun.payment_api.domain.UserDept;
import com.esun.payment_api.security.model.ChangePasswordBody;
import com.esun.payment_api.security.model.LoginBody;
import org.springframework.stereotype.Service;

@Service
public interface UserService {
    CommonResult getUserList();

    User addUser(User user) throws Exception;

    CommonResult editUser(User user);

    CommonResult changePassword(ChangePasswordBody changePasswordBody);

    CommonResult changePasswordRaw(ChangePasswordBody changePasswordBody);

    //修改用户的基本信息，不包含密码和权限
    CommonResult editUserBasic(User user);

    void setUserRole(User user) throws Exception;

    CommonResult getRoleList(Short companyId);

    CommonResult getUserList(Short companyId, Short departmentId);

    CommonResult getCompanyList();

    CommonResult getDepartmentList(Short companyId);

    CommonResult getMenuList(Short userId);

    UserDept getUserDeptById(Short userId);
}
